#include <bits/stdc++.h>
// 2025/01/24
// tag: 
// Author: Zhang Muen
using namespace std;

int n, m, width, xx, yy, len[20], slen[20];
char tree[5000][5000];

void make_tree(int dep, int x, int y){
    tree[x][y] = 'o';
    if (dep == n)
        return;
    int l = len[n - dep];
    for (int i = 1; i <= l; i++)
        tree[x + i][y + i] = '\\';
    for (int i = 1; i <= l; i++)
        tree[x + i][y - i] = '/';
    make_tree(dep + 1, x + l + 1, y + l + 1);
    make_tree(dep + 1, x + l + 1, y - l - 1);
}

void del_tree(int dep, int x, int y, bool flag, int pos){
    int l = len[n - dep];
    
    if (dep == yy && pos == xx)
        flag = true;
    if (flag == true){
        tree[x][y] = ' ';
        if (dep == n)
            return;
        for (int i = 1; i <= l; i++)
            tree[x + i][y + i] = ' ';
        for (int i = 1; i <= l; i++)
            tree[x + i][y - i] = ' ';
        del_tree(dep + 1, x + l + 1, y + l + 1, flag, pos * 2);
        del_tree(dep + 1, x + l + 1, y - l - 1, flag, pos * 2 - 1);
    }
    else{
        if (dep == n)
            return;
        if (dep + 1 == yy && pos * 2 - 1 == xx)
            for (int i = 1; i <= l; i++)
                tree[x + i][y - i] = ' ';
        if (dep + 1 == yy && pos * 2 == xx)
            for (int i = 1; i <= l; i++)
                tree[x + i][y + i] = ' ';
        del_tree(dep + 1, x + l + 1, y + l + 1, flag, pos * 2);
        del_tree(dep + 1, x + l + 1, y - l - 1, flag, pos * 2 - 1);
    }
    
}

signed main()
{
    cin >> n >> m;
    width = (1 << (n - 2)) * 6 - 1;
    len[1] = 1, slen[1] = 1;
    for (int i = 2; i < n; i++)
        len[i] = slen[i - 1] + i - 1, slen[i] = slen[i - 1] + len[i];
    for (int i = 1; i <= slen[n - 1] + n; i++)
        for (int j = 0; j < width; j++)
            tree[i][j] = ' ';
    make_tree(1, 1, width / 2);
    for (int i = 0; i < m; i++){
        cin >> yy >> xx;
        del_tree(1, 1, width / 2, false, 1);
        
    }
    for (int i = 1; i <= slen[n - 1] + n; i++){
            for (int j = 0; j < width; j++)
                cout << tree[i][j];
            cout << endl;
    }
    return 0;
}